function TrajOut=RollbackTrajToEarlierState(Traj,frame,params)
for i=1:length(Traj)
    indToKeep=Traj{i}(:,params.TN.frame)<=frame;
    if(any(indToKeep))
        TrajOut{i}=Traj{i}(indToKeep,:);
    end
end